package teil2;

public class Draht
{
    public enum Material
    {
        KUPFER, SILIZIUM
    }

    private Material material;

    private double laenge;

    private double durchmesser;

    public Draht()
    {
    }

    public Material getMaterial()
    {
        return material;
    }

    public void setMaterial(Material material)
    {
        this.material = material;
    }

    public double getLaenge()
    {
        return laenge;
    }

    public void setLaenge(double laenge)
    {
        this.laenge = laenge;
    }

    public double getDurchmesser()
    {
        return durchmesser;
    }

    public void setDurchmesser(double durchmesser)
    {
        this.durchmesser = durchmesser;
    }

    public double getRho()
    {
        if (material == Material.KUPFER)
        {
            return (17.8 * Math.pow(10, -9));
        }
        else
        {
            return (2.3 * Math.pow(10, 3));
        }
    }
}
